<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/translator.tld" prefix="trans" %><head>
<trans:initPage module="browseloc" />

<html:html>
<head>
      <link rel="stylesheet" href="<html:rewrite page="/alf.css" />" type="text/css">
      <script language="javascript">
            function make_layer_visible(layer) {
                  layer = document.getElementById(layer);
                  if (!layer) return;

                  if (layer.style) {
                        layer.style['visibility'] = 'visible';
                  } else {
                        layer.visibility = 'visible';
                  }
            }
      </script>
</head>
<body bgcolor="#FFFFFF" text="#000000">

<div id="loading" style="position: relative;visibility: hidden;height:50px;width:50%;left: 25%;top:5%;text-align: center;vertical-align: middle;border: 1px dotted;background-color: #f2f2f2;" class="text_searchbold"> 
  <br>
  Loading...<br>
  Please wait<br>
</div>
      <html:form action="/location/browser">
      <html:hidden property="field_changed" value="" />
      <table width="90%" border="0" cellspacing="1" cellpadding="5" align="center" bgcolor="#3399CC" class="text_searchbold">
            <tr bgcolor="#3399CC" class="textalb">
                  <td>
                  <trans:showPageMessage label="browseloc.locinfo" />
                  </td>
            </tr>

            <tr bgcolor="#FFFFFF"><td>
            <table width="100%" border="0">
                  <tr>
                  <td align="left" colspan="3" class=text>
                  <img src=../images/arrow_blue.gif hspace=10><b><trans:showPageMessage label="browseloc.cannotfindyourloc" />&nbsp;&nbsp;
                  <html:link action="/location/finder.do" ><trans:showPageMessage label="browseloc.searchforaloc" /></html:link></b>
                  <br><br>
                  </td>
                  </tr>

                  <!-- country regions -->
                  <tr>
                  <td width="10%" align="right">
                  <logic:equal value="cregion" name="marked_field" scope="request"><img src=../images/arrow_blue.gif hspace=4></logic:equal>
                  </td>
                  <td align="right" width="15%" class=text>
                  <trans:showPageMessage label="browseloc.cregions" />:
                  </td>
                  <td align="left" width="75%">
                  <html:select property="cregion_id"
                        onchange="javascript:this.form.field_changed.value='cregion';make_layer_visible('loading');this.form.submit();" >
                        <html:option value="-1"><trans:showPageMessage label="browseloc.nocregion" /></html:option>
                        <logic:present name="cregions" scope="request">
                              <html:options collection="cregions"
                                    property="id"
                                    labelProperty="listname" />
                        </logic:present>
                  </html:select>
                  </td>
                  </tr>

                  <!-- countries -->
                  <tr>
                  <td width="10%" align="right">
                  <logic:equal value="country" name="marked_field" scope="request"><img src=../images/arrow_blue.gif hspace=4></logic:equal>
                  </td>
                  <td align="right" width="15%" class=text>
                  <trans:showPageMessage label="browseloc.country" />:
                  </td>
                  <td align="left" width="75%">
                  <html:select property="country_iso3"
                        onchange="javascript:this.form.field_changed.value='country';make_layer_visible('loading');this.form.submit();" >
                        <html:option value="-1"><trans:showPageMessage label="browseloc.nocountry" /></html:option>
                        <logic:present name="countries" scope="request">
                              <html:options collection="countries"
                                    property="iso3"
                                    labelProperty="name" />
                        </logic:present>
                  </html:select>
                  </td>
                  </tr>

                  <!-- regions -->
                  <tr>
                  <td width="10%" align="right">
                  <logic:equal value="region" name="marked_field" scope="request"><img src=../images/arrow_blue.gif hspace=4></logic:equal>
                  </td>
                  <td align="right" width="15%" class=text>
                 <trans:showPageMessage label="browseloc.region" />:
                  </td>
                  <td align="left" width="75%">
                  <html:select property="region_id"
                        onchange="javascript:this.form.field_changed.value='region';make_layer_visible('loading');this.form.submit();" >
                        <html:option value="-1"><trans:showPageMessage label="browseloc.noregion" /></html:option>
                        <logic:present name="regions" scope="request">
                              <html:options collection="regions"
                                    property="id"
                                    labelProperty="name" />
                        </logic:present>
                  </html:select>
                  </td>
                  </tr>

                  <!-- counties -->
                  <tr>
                  <td width="10%" align="right">
                  <logic:equal value="county" name="marked_field" scope="request"><img src=../images/arrow_blue.gif hspace=4></logic:equal>
                  </td>
                  <td align="right" width="15%" class=text>
                <trans:showPageMessage label="browseloc.county" />:
                  </td>
                  <td align="left" width="75%">
                  <html:select property="county_id"
                        onchange="javascript:this.form.field_changed.value='county';make_layer_visible('loading');this.form.submit();" >
                        <html:option value="-1"><trans:showPageMessage label="browseloc.nocounty" /></html:option>
                        <logic:present name="counties" scope="request">
                              <html:options collection="counties"
                                    property="id"
                                    labelProperty="name" />
                        </logic:present>
                  </html:select>
                  </td>
                  </tr>

                  <!-- towns -->
                  <tr>
                  <td width="10%" align="right">
                  <logic:equal value="town" name="marked_field" scope="request"><img src=../images/arrow_blue.gif hspace=4></logic:equal>
                  </td>
                  <td align="right" width="15%" class=text>
                  <trans:showPageMessage label="browseloc.town" />:
                  </td>
                  <td align="left" width="75%">
                  <html:select property="town_id"
                        onchange="javascript:this.form.field_changed.value='town';make_layer_visible('loading');this.form.submit();" >
                        <html:option value="-1"><trans:showPageMessage label="browseloc.notown" /></html:option>
                        <logic:present name="towns" scope="request">
                              <html:options collection="towns"
                                    property="sirsup_id"
                                    labelProperty="name" />
                        </logic:present>
                  </html:select>
                  </td>
                  </tr>

                  <!-- villages -->
                  <tr>
                  <td width="10%" align="right">
                  <logic:equal value="village" name="marked_field" scope="request"><img src=../images/arrow_blue.gif hspace=4></logic:equal>
                  </td>
                  <td align="right" width="15%" class=text>
                  <trans:showPageMessage label="browseloc.village" />:
                  </td>
                  <td align="left" width="75%">
                  <html:select property="village_id">
                        <html:option value="-1"><trans:showPageMessage label="browseloc.novillage" /></html:option>
                        <logic:present name="villages" scope="request">
                              <html:options collection="villages"
                                    property="siruta_id"
                                    labelProperty="name" />
                        </logic:present>
                  </html:select>
                  </td>
                  </tr>

                  <tr>
                  <td align="left" colspan="3" style="color:#6666FF;font-weight:normal;" class=text>
                  <br>
                  
                  <br>
                  </td>
                  </tr>
            </table>
            </td></tr>

            <!-- submitari -->
            <tr bgcolor="#f9f9f9">
                  <td align="center" bgcolor="f9f9f9">
                  <input type="hidden" name="action" value="" />
                  <input type="button"
                        class="butonsave"
                        onclick="this.form.action.value='save';this.form.submit();"
                        value="<trans:showPageMessage label="browseloc.saveselected" hide_link="true" />" />
                  <input type="button"
                        class="butonsave"
                        onclick="javascript:window.close();"
                        value="<trans:showPageMessage label="browseloc.cancel" hide_link="true" />" />&nbsp;&nbsp;<trans:showPageMessage label="browseloc.saveselected1" />
                  </td>
            </tr>
      </table>
      </html:form>
</body>
</html:html>
